//
//  JFTTypeViewController.m
//  DemoProject
//
//  Created by zhl on 2017/2/17.
//  Copyright © 2017年 zhl. All rights reserved.
//

#import "JFTTypeViewController.h"
#import "ViewController.h"
@interface JFTTypeViewController (){
    NSString *serviceStr;
}
@end

@implementation JFTTypeViewController
- (void)viewDidLoad {
    [super viewDidLoad];
}
- (IBAction)typeButtonAction:(UIButton *)sender{
    switch (sender.tag) {
        case 1000:
            serviceStr =@"JFT";
            break;
        case 2000:
            serviceStr =@"YHB";
            break;
        case 3000:
            serviceStr =@"YZF";
            break;
        case 4000:
            serviceStr =@"WSF";
            break;
        case 5000:
            serviceStr =@"QAO";
            break;
        default:
            break;
    }
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        UIStoryboard * sb =
        [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        ViewController * lvc =
        [sb instantiateViewControllerWithIdentifier:@"ViewController"];
        lvc.serviceType =serviceStr;
        dispatch_async(dispatch_get_main_queue(), ^{
            [self.navigationController pushViewController:lvc animated:YES];
        });
    });
}
@end
